package com.j2eefast.bussiness.contract.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.j2eefast.bussiness.contract.entity.BusEquipmentEntity;
import com.j2eefast.bussiness.contract.entity.ContractEntity;
import com.j2eefast.framework.sys.entity.SysUserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>设备管理</p>
 *
 * @author: summer
 * @date: 2021-05-31 14:41
 * @web: http://www.letukeji.cn
 * @version: 1.0.1
 */
public interface BusEquipmentMapper extends BaseMapper<BusEquipmentEntity> {

    public BusEquipmentEntity equipmentInfo(@Param("id")int id);

    public boolean deleteByIds(@Param("ids") Long[] ids);
    public boolean updateCheck(@Param("id") Long id, @Param("userId") Long userId);
    //查询用户信息
    public SysUserEntity getSysById(@Param("userId") Long userId);
    BusEquipmentEntity selectEquipment();

    /**
     * 页面查询流程实例分页
     * @return
     */
    Page<BusEquipmentEntity> findPage(IPage<?> params,
                                      @Param("beginTime") String beginTime,
                                      @Param("endTime") String endTime,
                                      @Param("equipmentModel") String equipmentModel,
                                      @Param("manufacture") String manufacture,
                                      @Param("depositAddr") String depositAddr,
                                      @Param("useDepartment") String useDepartment,
                                      @Param("safekeeping") String safekeeping,
                                      @Param("remark") String remark,
                                      @Param("usages") String usages,
                                      @Param("equipmentCode") String equipmentCode,
                                      @Param("equipmentName") String equipmentName,
                                      @Param("equipmentValue") String equipmentValue,
                                      @Param("sql_filter") String sql_filter);


    List<BusEquipmentEntity> findList(IPage<?> params,
                                      @Param("beginTime") String beginTime,
                                      @Param("endTime") String endTime,
                                      @Param("equipmentType") String equipmentType,
                                      @Param("meteringUnit") String meteringUnit,
                                      @Param("depositAddr") String depositAddr,
                                      @Param("useDepartment") String useDepartment,
                                      @Param("safekeeping") String safekeeping,
                                      @Param("increase") String increase,
                                      @Param("usages") String usages,
                                      @Param("equipmentCode") String equipmentCode,
                                      @Param("equipmentName") String equipmentName,
                                      @Param("accumulatedDepreciation") String accumulatedDepreciation,
                                      // @Param("parentId") String parentId,
                                      @Param("sql_filter") String sql_filter);

    //查询设备编号是否存在
    BusEquipmentEntity getEquipmentInfo(@Param("equipmentCode")String equipmentCode);

//    List<BusEquipmentEntity> findList(
////            @Param("name") String name,
////            @Param("ceoName") String ceoName,
////            @Param("paymentNuit") String paymentNuit,
////            @Param("contractSum") String contractSum,
////            @Param("projectName") String projectName,
////            @Param("ids") Long[] ids,
//            @Param("sql_filter") String sql_filter);

}
